#include "astar.h"
#include "FSMSystem.h"

struct FSMPathCart : FSMCartridge
{
	FSMPathCart()
	{
		FSMCartridge();
	}
	~FSMPathCart(){ release(); }

	//main functions
	 void init() { }
	 void release() { }
	 void input() { }

	 Astar* astr;
	 TemplateVector<GraphNode<mapNode>*> mapNodes;
	 TemplateVector<GraphNode<mapNode>*> targetPath;
	 int indexOfTargetNode;

	 void getTarget(  )
	 {
		 //get closest point
		 //get target point
				//int findPath(GraphNode<mapNode> * start, GraphNode<mapNode> * goal, TemplateVector<GraphNode<mapNode>*> * a_output)
		 //astr->findPath(nearestNode(), goalNode(), &targetPath);
	     
	 }//path target

	 void update() 
	 {
		//if(needsTarget)
		  //getTarget();
		//else
		// {
		 ///seek(targetPath[indexOfTargetNode]->value->pos);
		  //if(reached(targetPath[indexOfTargetNode]->value->pos && indexOfTargetNode != targetPath.size())
		     //indexOfTargetNode++;
		// }
		 
	 
	 }
	 void draw() { }
	 void preLoop() { }
	 void postLoop() { }

	//getter functions
	bool completed(){return m_completed;}
	bool loaded(){return m_loaded;}
	bool renew(){return m_renew;}


};